<template>
  <div id="app">
    <Header></Header>
    <router-view></router-view>
    <!-- 通过路由元信息，控制Footer组件的显示与隐藏 -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from '@/components/header/index.vue';
import Footer from '@/components/footer/index.vue';
import '@/mock/mockServe';

export default {
  name: 'app',
  components: {
    Header,
    Footer
  },
  mounted(){
    /* 在根组件挂载，只请求一次三级联动列表的数据 */
    /* this.$store.dispatch("categoryList"); */
  }
}
</script>

<style lang="less">
</style>
